package com.game.messagebean.dubbo;

import com.baidu.bjf.remoting.protobuf.FieldType;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import com.game.message.jpb.SuperJPB;
import com.game.mongo.User;
import org.springframework.stereotype.Component;

/**
 * Created by Administrator on 2016/6/30.
 */
@Component
public class UserInfoResp extends SuperJPB {
	private User user;
	@Protobuf(fieldType = FieldType.INT32, order = 101, required = true)
	private int userId;
	@Protobuf(fieldType = FieldType.STRING, order = 102, required = true)
	private String nickName;
	@Protobuf(fieldType = FieldType.STRING, order = 103, required = true)
	private String loginName;
	@Protobuf(fieldType = FieldType.INT64, order = 104, required = true)
	private long coin;
	@Protobuf(fieldType = FieldType.INT64, order = 105, required = true)
	private long yuanbao;
	@Protobuf(fieldType = FieldType.STRING, order = 106, required = true)
	private String photoUrl;

	public UserInfoResp(User user) {
		this.user = user;
		this.userId = user.getUserId();
		this.nickName = user.getNickName();
		this.loginName = user.getLoginName();
		this.coin = user.getCoin();
		this.yuanbao = user.getCoin();
		this.photoUrl = user.getPhotoUrl();
	}
	public UserInfoResp() {
	}
}
